<?php
declare(strict_types=1);

namespace App\Mapper;

use App\Model\User;
use App\System\Model\SystemUser;
use Mrx\Core\Mapper\AbstractMapper;

/**
 * @Desc:
 * @Class: UserMapper
 * @Package: App\Mapper
 * @Author: mrx
 * @CreateTime: 2023-07-12  15:44
 * @Version: 1.0
 */
class UserMapper extends AbstractMapper
{
    /**
     * @var User
     */
    public $model;

    /**
     * @Desc:设置模型
     * @Funtion: assignModel
     * @Author: mrx
     * @CreateTime: 2023-07-12
     * @return mixed|void
     */
    public function assignModel()
    {
        $this->model = User::class;
    }

    /**
     * @Desc:通过用户id获取用户信息
     * @Funtion: getUserInfoById
     * @Author: mrx
     * @CreateTime: 2023-07-12
     * @param int $userId
     * @return void
     */
    public function getUserInfoById(int $userId)
    {
        return $this->read($userId);
    }
}